package cn.byapps.attendance.util;

public class HqlUtils {
	public String hql(Integer h){
		String hql="";
		if(h==1){
			hql="from Common where to_days(timeBegin) = to_days(now())";//今天动态
		}else if(h==2){
			hql="from Common where DATEDIFF(timeBegin,NOW())=-1";//昨天动态
		}else if(h==3){
			hql="from Common where YEARWEEK(date_format(absentTime,'%Y-%m-%d')) = YEARWEEK(now()";//本周动态
		}
		return hql;
	}
}
